/*
 * Scala.js (https://www.scala-js.org/)
 *
 * Copyright EPFL.
 *
 * Licensed under Apache License 2.0
 * (https://www.apache.org/licenses/LICENSE-2.0).
 *
 * See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 */

package org.scalajs.testsuite.javalib.util.function

import org.junit.Assert._
import org.junit.Test

import java.util.function._

class DoubleToLongFunctionTest {
  @Test def applyAsLong(): Unit = {
    val f = new DoubleToLongFunction {
      override def applyAsLong(value: Double): Long = (10 * value).toLong
    }
    assertEquals(f.applyAsLong(0.5), 5L)
    assertEquals(f.applyAsLong(3.3), 33L)
  }
}
